namespace PraceDyplomowe2.Migrations
{
    using System;
    using System.Data.Entity.Migrations;
    
    public partial class DodajStatusyDoTemat : DbMigration
    {
        public override void Up()
        {
            AddColumn("dbo.Temats", "StatusPromotor_StatusPromotorId", c => c.Int());
            AddColumn("dbo.Temats", "StatusStudent_StatusStudentId", c => c.Int());
            AddForeignKey("dbo.Temats", "StatusPromotor_StatusPromotorId", "dbo.StatusPromotors", "StatusPromotorId");
            AddForeignKey("dbo.Temats", "StatusStudent_StatusStudentId", "dbo.StatusStudents", "StatusStudentId");
            CreateIndex("dbo.Temats", "StatusPromotor_StatusPromotorId");
            CreateIndex("dbo.Temats", "StatusStudent_StatusStudentId");
            DropColumn("dbo.Temats", "StatusPromotorId");
            DropColumn("dbo.Temats", "StatusStudentId");
        }
        
        public override void Down()
        {
            AddColumn("dbo.Temats", "StatusStudentId", c => c.Int(nullable: false));
            AddColumn("dbo.Temats", "StatusPromotorId", c => c.Int(nullable: false));
            DropIndex("dbo.Temats", new[] { "StatusStudent_StatusStudentId" });
            DropIndex("dbo.Temats", new[] { "StatusPromotor_StatusPromotorId" });
            DropForeignKey("dbo.Temats", "StatusStudent_StatusStudentId", "dbo.StatusStudents");
            DropForeignKey("dbo.Temats", "StatusPromotor_StatusPromotorId", "dbo.StatusPromotors");
            DropColumn("dbo.Temats", "StatusStudent_StatusStudentId");
            DropColumn("dbo.Temats", "StatusPromotor_StatusPromotorId");
        }
    }
}
